package com.ybear.ybcomponent.widget.shape;

public class ShapeConfig {
    private int mEnableHardware = 0;

    private ShapeConfig() {
        enableHardware();
    }
    public static ShapeConfig get() { return HANDLER.I; }
    public static final class HANDLER { private static final ShapeConfig I = new ShapeConfig(); }

    public int getHardwareStatus() { return mEnableHardware; }

    /**
     * 启用硬件加速
     * 全部Shape控件都会启用
     * 默认选项
     * @return      this
     */
    public ShapeConfig enableHardware() {
        mEnableHardware = 1;
        return this;
    }

    /**
     * 关闭硬件加速
     * 全部Shape控件都会关闭
     * @return      this
     */
    public ShapeConfig displayHardware() {
        mEnableHardware = 0;
        return this;
    }

    /**
     * 跳过硬件加速
     * 全部Shape控件会忽略
     * 开发者自行设置硬件加速
     * @return      this
     */
    public ShapeConfig skipHardware() {
        mEnableHardware = -1;
        return this;
    }
}
